<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <h1>{{msg}}</h1>
        <div style="border: 2px solid red;">
            <my-con></my-con>
        </div>
    </div>
    <div id="abb">
        <div style="border: 2px solid green; margin-top: 20px;">
            <my-con></my-con>
        </div>
    </div>
    <script src="https://cdn.bootcdn.net/ajax/libs/vue/2.6.12/vue.js"></script>
    <script type="text/javascript">
        Vue.component('MyCon',{
            template:`<div>
                    <h1 v-for="val in name">汤圆:{{val}}</h1>
                </div>`,
            data(){
                return{
                    name:["黑芝麻","水果味"]
                }
            }
        })
        var vm = new Vue({
            el:'#app',
            data:{
                msg:'3月7日学习:'
            }
        });
        new Vue({
            el:'#abb'
        });
    </script>   
    
</body>
</html>